﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Configuration;
using CLibArtreve.bll;
using CLibArtreve.models;

namespace WebAppArtreve.views.shared.components.ratings
{
    public partial class WUCRating : System.Web.UI.UserControl
    {
        private string _connectionString
        {
            get
            {
                return ConfigurationManager.ConnectionStrings["ARTREVEConnectionString"].ConnectionString;
            }
        }

        protected void ODSRatingByUserId_OnObjectCreating(object sender, ObjectDataSourceEventArgs e)
        {
            //STEP 2. CREATE BLL
            RatingBLL ObjectInstance = new RatingBLL(_connectionString);
            //STEP 3. CONNECT TYPENAME
            e.ObjectInstance = ObjectInstance;
        }
    }
}